﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IOperation;//引入自定义的接口类库的命名空间

namespace AddClassLibrary
{
    public class Add:Ioperation
    {
        /// <summary>
        /// 操作符的名称
        /// </summary>
        public string Name { get; set; } = "+";

        /// <summary>
        /// 左操作数
        /// </summary>
        public int NumberLeft { get; set; }

        /// <summary>
        /// 右操作数
        /// </summary>
        public int NumberRight { get; set; }

        /// <summary>
        /// 获取计算结果
        /// </summary>
        /// <returns></returns>
        public double GetResult()
        {
            return NumberLeft + NumberRight;
        }

    }
}
